package com.cloudfast.platform.user.dao;

import com.cloudfast.platform.user.entity.UserRole;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.cloudfast.dao.BaseDao;
import com.cloudfast.dao.impl.BaseDaoImpl;

/**
 * 用户角色 关联
 *
 * @author liuyw
 * @描述:用户
 * @date 2020年4月10日
 */
public interface UserRoleDao extends UserRoleBaseCustomer, JpaRepository<UserRole, String> {

    @Modifying
    @Query("delete from  UserRole where userId=?1")
    public void clearUserRole(Long userId);

}

interface UserRoleBaseCustomer extends BaseDao<UserRole, String> {

}

@Repository
class UserRoleDaoImpl extends BaseDaoImpl<UserRole, String> implements UserRoleBaseCustomer {

}
